import request from '@/utils/request'
//查询好友分组
export function getFriendGroups() {

  return request({
    url: '/system/groups/selectFriendGroups',
    method: 'post',
  })
}
// 查询查询指定用户的分组
export function getGroupsByUserId() {
  return request({
    url: '/system/groups/selectGroupsByUserId',
    method: 'get',
  })
}
// 查询分组列表
export function listGroups(query) {
  return request({
    url: '/system/groups/list',
    method: 'get',
    params: query
  })
}

// 查询分组详细
export function getGroups(groupId) {
  return request({
    url: '/system/groups/' + groupId,
    method: 'get'
  })
}

// 新增分组
export function addGroups(data) {
  return request({
    url: '/system/groups',
    method: 'post',
    data: data
  })
}

// 修改分组
export function updateGroups(data) {
  return request({
    url: '/system/groups',
    method: 'put',
    data: data
  })
}

// 删除分组
export function delGroups(groupId) {
  return request({
    url: '/system/groups/' + groupId,
    method: 'delete'
  })
}
